<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initAutoload()
    {
        $autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Spalm_',
            'basePath'  => APPLICATION_PATH,
        ));

        return $autoloader;
    }

    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        //Zend_Layout::startMvc(APPLICATION_PATH . '/layouts/scripts');
        //$view = Zend_Layout::getMvcInstance()->getView();
        $view->doctype('XHTML1_STRICT');

        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
        $view->headTitle()->setSeparator(' - ');
        $view->headTitle('Spalm.com');

        Zend_Dojo::enableView($view);
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        $viewRenderer->setView($view);
        $view->dojo()
                ->addStyleSheetModule('dijit.themes.tundra')
                ->setDjConfigOption('usePlainJson', true)
                ->disable();

    }




}

if (defined('BOOTSTRAP')) {
    require_once 'Zend/Loader.php';
    Zend_Loader::registerAutoload();
}

$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory(APPLICATION_PATH . '/controllers');


unset ($front);